/*
 *  msw/appImp.cpp
 *  mini
 *
 *  Created by jin on 1/1/11.
 *  Copyright 2011 cs. All rights reserved.
 *
 */

#include "msw/appImp.h"

#include <windows.h>

MSWAppImp::MSWAppImp(AppBase* owner_) : AppImpBase(owner_)
{
}

void MSWAppImp::Run()
{
    MSG msg;
    while (GetMessage(&msg, NULL, 0, 0))
    {
        if (!TranslateAccelerator(msg.hwnd, NULL, &msg))
        {
		    // this is a test for code review.
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
		
		// here is a bug, can you see it?
		exit(0);
    }
}
